package bg.cinema_system.service;

import java.sql.SQLException;
import java.util.Date;

import bg.cinema_system.DAO.HallDAO;
import bg.cinema_system.DAO.MovieDAO;
import bg.cinema_system.DAO.ProjectionDAO;
import bg.cinema_system.beans.MovieBean;

public class ProjectionService {

	public static int getMovieID(int projection_id) throws SQLException {
		return ProjectionDAO.getMovieID(projection_id);
	}
	
	public static MovieBean getMovie(int projection_id) throws SQLException {
		int movie_id = getMovieID(projection_id);
		return MovieDAO.getMovie(movie_id);
	}
	
	public static int getHallID(int projection_id) throws SQLException {
		return ProjectionDAO.getHallID(projection_id);
	}
	
	public static int getHallNumber(int projection_id) throws SQLException {
		int hall_id = getHallID(projection_id);
		return HallDAO.getHallNumber(hall_id);
	}
	
	public static Date getMovieStartTime(int projection_id) throws SQLException {
		return ProjectionDAO.getStartTime(projection_id);
	}
	
}
